Note
Mend has cancelled the proposed renaming of the Renovate GitHub app being renamed to mend[bot]
.
This notice will be removed on 2025年10月07日.
This PR contains the following updates:
Release Notes
tree-sitter/tree-sitter (web-tree-sitter)
Compare Source
Compare Source
What's Changed
New Contributors
Full Changelog : tree-sitter/tree-sitter@v0.25.8...v0.25.9
Compare Source
What's Changed
Full Changelog : tree-sitter/tree-sitter@v0.25.7...v0.25.8
Compare Source
What's Changed
Full Changelog : tree-sitter/tree-sitter@v0.25.6...v0.25.7
Compare Source
What's Changed
Full Changelog : tree-sitter/tree-sitter@v0.25.5...v0.25.6
Compare Source
What's Changed
Full Changelog : tree-sitter/tree-sitter@v0.25.4...v0.25.5
Compare Source
What's Changed
Full Changelog : tree-sitter/tree-sitter@v0.25.3...v0.25.4
Compare Source
Bug Fixes
Fixed an infinite loop that could happen in some grammars during error recovery if the end of the file was reached.
Fixed a parser-generation error where internal character set constants were given external linkage, which could cause linking errors on some platforms if multiple Tree-sitter parsers were linked into the same application.
Compare Source
Bug Fixes
Fixed a crash that could occur when loading WASM-compiled languages that were generated with an earlier version of the Tree-sitter CLI (#4210 ).
Fixed incorrect tokenization when using WASM-compiled languages, if the language's external scanner did not assign to result_symbol
(#4218 )
Fixed an infinite loop that could occur if external scanners returned empty extra tokens (#4213 )
Build
Decreased the rustc version required to build the tree-sitter-languages
and tree-sitter
crates (#4221 )
Compare Source
Changelog
[0.25.1] — 2025年02月02日
Features
cli : Specify abi version via env var (#4173 )
Bug Fixes
bindings : Correct Zig bindings to expose a language
function
lib : Prevent finished_tree assertion failure (#4176 )
Documentation
Correct build steps for WASM files
Build System and CI
Use ubuntu-22.04
for x64 builds (#4175 )
Bump version to 0.25.1
Other
rust : Correct doc comments
Compare Source
Changelog
[0.25.0] — 2025年02月01日
Notices
This is a large release. As such, a few major changes and how to adapt to them are outlined below:
web-tree-sitter
was rewritten in TypeScript. With that, we also now publish the sourcemaps, and debug builds for the library. We also publish both CommonJS and ESM modules.
The internal ABI was bumped to 15. The main benefits this brings is that the language name, version, supertype info, and reserved words are added to the parsers. To use ABI 15, you must have a tree-sitter.json
file in your repository, since the version information for the parser is pulled from this file.
Parsing and Querying should be cancelled using the "progress callback", rather than setting a timeout or a cancellation flag, which are now deprecated. To do so, use the "parse/query with options" function in the bindings you choose to use, in the next release the old way of timing out parsing will be removed, which allows us to get rid of our dependency on the time.h
headers in the core library.
MISSING
nodes can now be queried, and queries involving supertypes are properly validated now.
The ts_node_child_containing_descendant
function was removed; use ts_node_child_with_descendant
instead (which has nearly the same behavior but can also return descendant
.)
TSInput
now includes a (mandatory) new field DecodeFunction
, which allows passing a custom decode function. To use the builtin function, pass NULL
.
In the DSL, there is now a RustRegex
function, which takes in a Rust regex as a string. All of the capabilities of Rust's regex engine are available here, which allows for some nice features that aren't possible with JavaScript regexes.
We've migrated our documentation to mdBook, and greatly improved the docs.
Breaking
Properly handle UTF-16 endianness encoding (#3740 )
Bump internal abi to 15 (#3803 )
Update playground with new web bindings (#4121 )
bindings : Update swift bindings (#4154 )
cli : Remove migration code for tree-sitter.json
(#4107 )
generate : Use regex_syntax::Hir
for expanding regexes (#3831 )
lib : Remove ts_node_child_containing_descendant
(#4107 )
lib : Add the ability to specify a custom decode function (#3833 )
web : Rewrite the library in TypeScript (#4121 )
web : Use the WASM module in the bindings, and not the other way around (#4121 )
web : Rename pattern
to patternIndex
in QueryMatch
(#4141 )
web : Deprecate Language.query
in favor of new Query
(#4141 )
Features
Drop legacy binding updates (#3734 )
Bump version to 0.25 (#3752 )
Allow setting the output directory for generated source files (#2614 )
Move scripts to xtasks (#3758 )
Add CST pretty-printer for parser output (#3762 )
Add version
subcommand for versioning grammars (#3786 )
Add build sha to parser.c header comment (#3828 )
Implement a cache for get_column
(#2503 )
Generate schema in tree-sitter.json (#3947 )
Support querying missing nodes (#3887 )
Add flag to output css classes instead of inline styles in HTML highlighter output (#3879 )
Add xtask to bump emscripten-version
(#4015 )
Add 'reserved word' construct (#3896 )
Add Supertype API (#3938 )
Support passing in a Rust regex in the grammar dsl (#4076 )
Allow parser balancing to be cancellable (#4122 )
Remove lazy_static
in favor of LazyLock
(#4130 )
Add and apply eslint config (#4121 )
Begin autogenerating web-tree-sitter.d.ts
(#4121 )
Publish both CJS and ESM files (#4121 )
Add a patternIndex
field to QueryCapture
(#4141 )
Improve PredicateStep
types (#4141 )
Add the semantic version to TSLanguage, and expose an API for retrieving it (#4135 )
Add error information in the progress callback (#3987 )
bindings : Auto-detect scanners (#3809 )
bindings : Drop language name from node (#3184 )
bindings : Update some binding files (#3952 )
bindings : Drop python 3.9 support (#3799 )
bindings : Support free-threaded python build (#3799 )
bindings : Add opt-in zig bindings (#4144 )
bindings : Use cc
1.2 for Rust (#4156 )
cli : Verify assertions for every carat in tests, not just the first one (#3927 )
cli : Add nushell completions (#4000 )
cli : Don't validate email addresses in init
command (#3999 )
cli : Show parse times in testing output (#3939 )
cli : Display parse and edit times separately for parse --time
(#4016 )
cli : Make input handling agnostic (#4054 )
cli : Rework parse to use new input handler (#4054 )
cli : Rework query to use new input handler (#4054 )
cli : Rework highlight to use new input handler (#4054 )
cli : Rework tags to use new input handler (#4054 )
cli : Add json summary of parsing (#4048 )
cli : Allow test
subcommand to include/exclude by corpus test file names (#4095 )
cli : Improve readability of parse debug output (#4118 )
generate : Add a comment with the tree-sitter version (#3825 )
generate : Add .exp
and .lib
files to gitignore template (#4079 )
generate : Explicitly disallow non-terminals in non-terminals (#4111 )
generate : Properly filter out unused rules (#4111 )
generate : Add an extra field for extra nodes in node-types.json
(#4116 )
generate : Defer to ABI 14 if tree-sitter.json
doesn't exist, rather than hard failing (#4156 )
highlight : Mark TSHighlighter
fields as pub (#3990 )
init : Allow dashes in scopes (#4142 )
init : Add an optional funding
field (#4142 )
init : Add a class-name
field to grammars (#4142 )
init : Add a title
field to grammars (#4142 )
lib : Wrap subtrees with changes in green circles (#3741 )
lib : Add the language name (#3184 )
lib : Add ts_parser_parse_with_options
(#3843 )
lib : Add ts_query_cursor_exec_with_options
(#3843 )
lib : Use const
for TSCharacterRanges
(#4027 )
lib : Implement Send
+ Sync
for WasmStore
(#4130 )
loader : Add language_for_configuration
(#3816 )
loader : Add error message when a tree-sitter.json
file is invalid (#3897 )
loader : Support multi-barreled file extensions (#3880 )
loader : Add a way to get the cwd's language config (#4054 )
make,cmake : Install queries along with parser libraries (#3958 )
node : Support single-file executables via bun build --compile (#3905 )
node : Update bindings when necessary (#3906 )
playground : Provide colored highlight for captures in code editor (#4089 )
query : Structurally verify supertype queries (#4110 )
rust : Add Language::node_kind_is_supertype
(#3788 )
rust : Add *_with_options
to the parser and query cursor, deprecate old functions (#3843 )
rust : Remove usage of deprecated functions (#3843 )
rust : Use thiserror
for generate
crate (#4048 )
tags : Implement Send
+ Sync
for TagsConfiguration
(#4130 )
wasm : Add Supertype API (#3938 )
web : Add missing API functions (#4074 )
web : Document the API (#4121 )
web : Use custom error type for query errors (#4141 )
web : Include C source files for debugging (#4171 )
xtask : Add upgrade-wasmtime command (#3771 )
xtask : Let upgrade-wasmtime update Cargo.lock (#3890 )
xtask : Check wasm exports (#4074 )
xtask : add --watch
option for build-wasm
and check-wasm-exports
xtask commands (#4082 )
xtask : Add success message for wasm watchers (#4131 )
Bug Fixes
Return LanguageRef
in Parser::language
(#3797 )
Make sha generation work with submodules (#3828 )
Disallow tokens that match the empty string (#3864 )
Compiler warning (#3936 )
Clippy lint
Clippy lints
Minor issues with CI (#3971 )
Keep highlight names list consistent in the docs and cli (#2065 )
Re-export StreamingIterator
and StreamingIteratorMut
(#4034 )
Update outdated links (#4064 )
platform (#4106 )
bindings : Update CMakeLists.txt file (#3869 )
bindings : Fix scanner check in binding.gyp (#3874 )
bindings : Include headers & queries in python sdist (#3952 )
cli : Do not stop printing dot graphs until edits are re-parsed (#3741 )
cli : Remove unnecessary referencing/dereferencing in build_parse_table
(#3798 )
cli : Pass all fields to tree-sitter.json
in init
(#3856 )
cli : Use contains
over is
in warning (#3867 )
cli : Replace nerd font symbols with unicode symbols (#3835 )
cli : Count skipped tests correctly (#3835 )
cli : Correct warning message (#4009 )
cli : Only remove test input's trailing '\r' if running on Windows (#4106 )
cli : Fix error display, considering structured data returned from generate command (#4108 )
cli : Correct default query paths (#4009 )
cli : Gracefully handle OOB assertions (#4011 )
cli : Handle nested tags test files (#4010 )
cli : Use xdg config directory on macOS (#4026 )
cli : Correct range in cst pretty printer (#4057 )
cli : Remove double print of generate errors (#4083 )
cli : Correct test update option (#4109 )
cli : Improve error message for nonterminals used in token rule (#4115 )
cli : Minor discrepancies with pretty printer (#4147 )
cli : Correct traversal behavior for finding error nodes (#4152 )
cli : Propagate error flag in parse summary (#4164 )
cmake : Use current source dir for EXISTS check (#3907 )
docs : Update link for "Error Detection and Recovery in LR Parsers" (#3866 )
dsl : Fix types for RuleBuilder (#3812 )
endian : Support POSIX mode on Apple platforms (#4068 )
endian : Rely on system headers where possible (#4149 )
generate : Do not set the unit reduction symbol if it's in the extras array (#3868 )
generate : Improve display of token sets with escape characters (#4092 )
generate : Improve error message when a duplicate token is used as the word token (#4092 )
init : Use camel name from config in missing spots (#3790 )
init : Use current path if unspecified (#3795 )
init : Don't prepend the default filetype with a .
(#4142 )
init : Handle parser name replacements better when a kebab-case
name is expected (#4142 )
lib: Check point, byte ranges in ts_query_cursor_set
(#3865 )
lib : check point, byte ranges in node_descendant_for
(#3865 )
lib : Correct unexpected side effect in get_column
when the lexer is at EOF (#3764 )
lib : Fix compilation issue on windows with endian.h
(#3772 )
lib : Properly reset the lexer's start postiion (#3770 )
lib : Add parameter names in declarations in subtree.h
(#3787 )
lib : Handle compiler warnings (#3781 )
lib : Simplify edge cases with zero-width tokens (#3836 )
lib : Correctly fetch the node name in query errors (#3904 )
lib : Correct next sibling of zero width node (#3898 )
lib : Correct escape detection for invalid anonymous nodes (#3945 )
lib : Use clock_gettime
on macOS again (#3976 )
lib : Add saturating subtraction to prevent integer underflow (#4037 )
lib : Correct fix for parsing hang with ranges containing empty points (#4037 )
lib : Propagate last_child
status to pattern alternatives in queries (#4067 )
lib : Prevent wildcards from incorrectly marking child patterns as infallible (#4069 )
lib : Don't consider unfinished captures definite when the following step is immediate (#4070 )
lib : Avoid OOB access when updating alternative steps (#4096 )
lib : Use inclusive range check for non-empty nodes in next sibling computation (#4097 )
lib : Temporarily allow lint with false positives (#4124 )
lib : Don't always clear the tree stack (#4132 )
loader : Don't print warnings if the file is not found (#3909 )
playground : Correct link to upstream playground (#4040 )
playground : Ensure local playground is initialized (#4040 )
playground : Add dark theme, align ui more akin to upstream playground (#4040 )
playground : Add back underline on tree nodes, and query error underline (#4040 )
playground : Restore select value's text from local storage (#4040 )
playground : Gracefully fallback to JavaScript
if the select info is undefined
playground : Work around lack of module support in mdbook (#4140 )
query : Ensure immediate matches for any node when an anchor follows a wildcard node (#4047 )
rust : Fix progress callback scope to prevent premature drop (#3863 )
rust : Adapt to a few new nightly lints (#4045 )
rust : Use PathBuf
for --query-paths
highlight
option (#4071 )
rust : Adapt to a few new nightly lints (#4099 )
templates : Properly replace author email (#3742 )
wasm : Check docker presence without arguments (#4087 )
wasm : Allow passing in ERROR
in descendantsOfType
(#4103 )
web : Correct getExtent
(#4074 )
web : Correct builds for CJS (#4121 )
web : Only export public types (#4141 )
web : Correct debug file location (#4157 )
web : Update check-artifacts
script (#4158 )
web : Correct doc comment (#4166 )
xtask : Correct header path (#3803 )
xtask : Remove the test_flags
arg if it's empty for cargo test (#3889 )
xtask : Bring back language and example filter (#3926 )
xtask : Add emscription version in commit msg (#4020 )
xtask : Adapt check-wasm-exports
to web changes (#4121 )
Performance
loader : Improve language lookup speed (#3776 )
Documentation
Update changelog
Update changelog
Recommend npm install
for editor integration (#3855 )
Code-format repro commands in bug report template (#3852 )
Fix missing links (#3857 )
Add missing tags description (#3923 )
Remove CHANGELOG.md (#3928 )
Add documentation for TSPoint coordinates (#3949 ) (#3949 )
Fix typo (#4024 )
Clarify the start rule of a grammar (#4028 )
Migrate to mdbook (#4032 )
Fix link to contributing.md
Add guide on contributing to docs (#4035 )
Move assets to correct path (#4040 )
Add favicon and logo (#4040 )
Add back detailed info about points
Add --test-number
entries for query, highlight, and tag subcommands (#4054 )
Clarify data returned by QueryCaptures
during iteration (#4073 )
Add mdbook-admonish for better tooltips
Add note on not duplicating the word token rule (#4092 )
Update playground references (#4093 )
Clarify that the optional fields are a function that take in the grammar object
Add example usage of conflicts (#4098 )
Improve docs for contributing to docs (#4100 )
Improve docs around lexical precedence (#4101 )
Add information about the scoping of cursors (#4102 )
Fix broken link (#4127 )
Add documentation on updating and publishing grammars (#4135 )
Add guidance about node naming conventions (#4148 )
Add missing summary element (#4150 )
lib : Improve documentation on ts_tree_get_changed_ranges
and ts_query_cursor_set_{byte,point}_range
(#4114 )
rust : Updated README to reflect language initialization updates (#3757 )
rust : Document optional features (#3822 )
rust : Add --locked
to installation instructions (#3850 )
rust : Update doc comment on node ids (#3364 )
scanner : Add overview to the scan
function
web : Add instructions for Vite (#2830 )
web : Update process on fetching WASM files (#4121 )
web : Update docs (#4121 )
web : Update README and add CONTRIBUTING docs (#4121 )
web : Update type definitions (#4141 )
xtask : Update doc to use xtask, not scripts
Refactor
Reuse symbol variable in subtype map generator (#3942 )
Rewrite scripts in typescript
Configuration
📅 Schedule : Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge : Enabled.
♻ Rebasing : Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore : Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate . View the repository job log .
Uh oh!
There was an error while loading. Please reload this page.
Note
Mend has cancelled the proposed renaming of the Renovate GitHub app being renamed to
mend[bot]
.This notice will be removed on 2025年10月07日.
This PR contains the following updates:
0.24.5
->0.25.10
Release Notes
tree-sitter/tree-sitter (web-tree-sitter)
v0.25.10
Compare Source
v0.25.9
Compare Source
What's Changed
Vec
capacities by @tree-sitter-ci-bot[bot] in #4629Node::utf16_text
by @tree-sitter-ci-bot[bot] in #4663var_i32_type
after initializing global stack pointer value by @tree-sitter-ci-bot[bot] in #4732ERROR
node is named before assuming it's the builtin error node by @tree-sitter-ci-bot[bot] in #4746New Contributors
Full Changelog: tree-sitter/tree-sitter@v0.25.8...v0.25.9
v0.25.8
Compare Source
What's Changed
Full Changelog: tree-sitter/tree-sitter@v0.25.7...v0.25.8
v0.25.7
Compare Source
What's Changed
test
command to a single thread on windows by @tree-sitter-ci-bot[bot] in #4504extra
field innode-types.json
by @tree-sitter-ci-bot[bot] in #4569Vec
capacities where appropriate by @tree-sitter-ci-bot[bot] in #4581Full Changelog: tree-sitter/tree-sitter@v0.25.6...v0.25.7
v0.25.6
Compare Source
What's Changed
Full Changelog: tree-sitter/tree-sitter@v0.25.5...v0.25.6
v0.25.5
Compare Source
What's Changed
Full Changelog: tree-sitter/tree-sitter@v0.25.4...v0.25.5
v0.25.4
Compare Source
What's Changed
make install
shouldn’t fail when a parser bundles no queries by @tree-sitter-ci-bot in #4291BTreeMap
overIndexMap
for highlight configs by @tree-sitter-ci-bot in #4382move
by @tree-sitter-ci-bot in #4410end
subtree ints_subtree_summarize_children
by @tree-sitter-ci-bot in #4418last_child_step_index
in cases where a new step wasn't created. by @tree-sitter-ci-bot in #4428Full Changelog: tree-sitter/tree-sitter@v0.25.3...v0.25.4
v0.25.3
Compare Source
Bug Fixes
v0.25.2
Compare Source
Bug Fixes
result_symbol
(#4218)Build
tree-sitter-languages
andtree-sitter
crates (#4221)v0.25.1
Compare Source
Changelog
[0.25.1] — 2025年02月02日
Features
Bug Fixes
language
functionDocumentation
Build System and CI
ubuntu-22.04
for x64 builds (#4175)Other
v0.25.0
Compare Source
Changelog
[0.25.0] — 2025年02月01日
Notices
This is a large release. As such, a few major changes and how to adapt to them are outlined below:
web-tree-sitter
was rewritten in TypeScript. With that, we also now publish the sourcemaps, and debug builds for the library. We also publish both CommonJS and ESM modules.tree-sitter.json
file in your repository, since the version information for the parser is pulled from this file.time.h
headers in the core library.MISSING
nodes can now be queried, and queries involving supertypes are properly validated now.ts_node_child_containing_descendant
function was removed; usets_node_child_with_descendant
instead (which has nearly the same behavior but can also returndescendant
.)TSInput
now includes a (mandatory) new fieldDecodeFunction
, which allows passing a custom decode function. To use the builtin function, passNULL
.RustRegex
function, which takes in a Rust regex as a string. All of the capabilities of Rust's regex engine are available here, which allows for some nice features that aren't possible with JavaScript regexes.Breaking
tree-sitter.json
(#4107)regex_syntax::Hir
for expanding regexes (#3831)ts_node_child_containing_descendant
(#4107)pattern
topatternIndex
inQueryMatch
(#4141)Language.query
in favor ofnew Query
(#4141)Features
version
subcommand for versioning grammars (#3786)get_column
(#2503)emscripten-version
(#4015)lazy_static
in favor ofLazyLock
(#4130)web-tree-sitter.d.ts
(#4121)patternIndex
field toQueryCapture
(#4141)PredicateStep
types (#4141)cc
1.2 for Rust (#4156)init
command (#3999)parse --time
(#4016)test
subcommand to include/exclude by corpus test file names (#4095).exp
and.lib
files to gitignore template (#4079)node-types.json
(#4116)tree-sitter.json
doesn't exist, rather than hard failing (#4156)TSHighlighter
fields as pub (#3990)funding
field (#4142)class-name
field to grammars (#4142)title
field to grammars (#4142)ts_parser_parse_with_options
(#3843)ts_query_cursor_exec_with_options
(#3843)const
forTSCharacterRanges
(#4027)Send
+Sync
forWasmStore
(#4130)language_for_configuration
(#3816)tree-sitter.json
file is invalid (#3897)Language::node_kind_is_supertype
(#3788)*_with_options
to the parser and query cursor, deprecate old functions (#3843)thiserror
forgenerate
crate (#4048)Send
+Sync
forTagsConfiguration
(#4130)--watch
option forbuild-wasm
andcheck-wasm-exports
xtask commands (#4082)Bug Fixes
LanguageRef
inParser::language
(#3797)StreamingIterator
andStreamingIteratorMut
(#4034)platform (#4106)
build_parse_table
(#3798)tree-sitter.json
ininit
(#3856)contains
overis
in warning (#3867).
(#4142)kebab-case
name is expected (#4142)ts_query_cursor_set
(#3865)node_descendant_for
(#3865)get_column
when the lexer is at EOF (#3764)endian.h
(#3772)subtree.h
(#3787)clock_gettime
on macOS again (#3976)last_child
status to pattern alternatives in queries (#4067)JavaScript
if the select info is undefinedPathBuf
for--query-paths
highlight
option (#4071)ERROR
indescendantsOfType
(#4103)getExtent
(#4074)check-artifacts
script (#4158)test_flags
arg if it's empty for cargo test (#3889)check-wasm-exports
to web changes (#4121)Performance
Documentation
npm install
for editor integration (#3855)contributing.md
--test-number
entries for query, highlight, and tag subcommands (#4054)QueryCaptures
during iteration (#4073)ts_tree_get_changed_ranges
andts_query_cursor_set_{byte,point}_range
(#4114)--locked
to installation instructions (#3850)scan
functionRefactor
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.